A messaging service, for a non-limiting example, Java® Messaging Service (JMS), is an application program interface (API) that supports the formal communication known as messaging between computers in a network. Here, messaging is the creation, storage, exchange, and management of messages between producers who send/publish the messages to a queue of a destination and consumers who receive, subscribe, and browse the messages from the queue of the destination. Here, a message can be but are not limited to, text, image, voice, telex, fax, e-mail, paging, and other suitable electronic data describing events, requests, and replies over a communications network. A distributed destination is a set of destinations (queues or topics) that are accessible as a single, logical destination to a client. The destinations can be hosted on a messaging server.
The JMS specification specifies ordered message delivery in a very strict sense by defining order between a single instance of a producer and a single instance of a consumer. It does not take into account that there may be multiple producers within a single application acting as a single producer. The case where there are multiple consumers acting in concert is even more common. Moreover, when consumers reject messages (recover or transaction rollback), other messages from the same producer can be delivered to another consumer for processing.